package exceptionPractise;

public class WithdrawalClass {

	private int bal;
	private int accno;
	public WithdrawalClass(int anumber, int balance)
	{
		bal = balance ;
		accno = anumber;
	}
	
	public void withdraw(int amount)
	{
		if(bal > amount)
		{
			bal = bal - amount ;
		}
		else
		{
			throw new UserDefinedException("insufficient Funds");
		}
	}
	
}
